<ul class="subNavig">
        <li><a href="{$data.root}?input=list_of_clients">Clients</a></li>
        <li><a href="{$data.root}?input=list_of_users">Users</a></li>
        <li><a href="{$data.root}?input=list_of_tariffs">Tariffs</a></li>
        <li><a href="{$data.root}?input=fixed_expense">Fixed expenses</a></li>
    </ul>
{include $data.pathToError}
<script type="text/javascript">
    {literal}
        
    $(document).ready(function() {
        $(".float").change(function() {
            makeFloat(".float");
        });
    });
    {/literal}
</script>
<h2 class="pageTitle">Edit tariff</h2>
<form class="adding" action="{$data.root}?input=edit_tariff&tariff={$smarty.request.tariff}" method="post" onsubmit="return checkAdd_tariff(
                                                                    $('#title').val(),
                                                                    $('#tariff').val(),
                                                                    $('#servis_tariff').val(),
                                                                    $('#unit').val(),
                                                                    $('#type_of_record').val())
                                                                    ">
    <table class="tableForm">
        <tr>
            <td>
                <label for="title">Title <span class="red">*</span> </label>
            </td>
            <td>
                <input name="tariff_data[title]" id="title" type="text" value="{$data.tariff_data.title}" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="tariff">Tariff<span class="red">*</span> </label>
            </td>
            <td>
                <input class="float" name="tariff_data[tariff]" id="tariff" type="text" value="{$data.tariff_data.tariff}" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="servis_tariff">Servis tariff<span class="red">*</span> </label>
            </td>
            <td>
                <input class="float" name="tariff_data[servis_tariff]" id="servis_tariff" type="text" value="{$data.tariff_data.servis_tariff}" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="unit">Unit<span class="red">*</span> </label>
            </td>
            <td>
                <input name="tariff_data[unit]" id="unit" type="text" value="{$data.tariff_data.unit}" />
            </td>
        </tr>
        <tr>
            <td>
                <label for="type_of_record">Type of timesheet-record<span class="red">*</span> </label>
            </td>
            <td>
                <select name="tariff_data[type_of_record]" size="1" id="type_of_record">
                    <option value="">Please select</option>
                    {foreach $data.types_of_record as $key => $type}
                        <option value="{$type.Id}" {if $type.Id == $data.tariff_data.type_of_record}selected="selected"{/if}>{$type.type_of_record}</option>
                    {/foreach}
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <label for="description">Description<span class="red"></span> </label>
            </td>
            <td>
                <textarea cols="60" rows="5" name="tariff_data[description]" id="description">{$data.tariff_data.description}</textarea>
            </td>
        </tr>
        <tr class="submitRow">
            <td>
                <input name="action" value="edit_tariff" type="hidden" />
            </td>
            <td>
                <input type="submit" value="Edit tariff" name="edit_tariff" /> &nbsp; 
                <span class="red">* Required</span>
            </td>
            <td></td>
        </tr>
    </table>
</form>